package com.picket;

import javax.servlet.http.HttpServletRequest;

import com.picket.domain.Event;
import com.picket.domain.GaeUser;
import com.picket.domain.Pool;

public class Messages {
	
	public static String poolCreationConfirmation(GaeUser user,Pool pool,Event event,HttpServletRequest request){
		return "<html><body><p>" +
		"Hi "+user.getFirstname()+" "+user.getLastname()+",<br/>" +
	    "Congratulations, you have successfully created new pool <strong>"+pool.getName()+"</strong>.<br/>" +
		"<p>Reference number for this pool is <strong>"+pool.getReferralKey()+"</strong>.</p>" +
		"<p>Please use the following link to start predicting:</p>"+
		"<p>http://"+request.getServerName()+"/landing</p>"+
	    "<br/><p>Hope you will have great fun.</p>" +
	    "<br/><p>Cheers,<br/>picket admin</p>" +
	    "</body></html>";
	}
	//http://localhost:8888/pool/join/user?referral=1507fe2e-6b55-4ebf-99f6-d0ef7df1563b
	public static String inviteFriendsToJoinPool(GaeUser user, Pool pool, Event event,HttpServletRequest request){
		return "<html><body><p>" +
				"Hi,<br/>" +
			    "Your friend "+user.getFirstname()+" "+user.getLastname()+",wants to welcome you to play prediction game for the upcoming event <strong>"+event.getLabel()+"</strong>" +
	    		"starting on <strong>"+event.getStartDate() +"</strong></p>"+
	    		"<p>To play predictions you will need to register and subscribe to a pool that "+user.getFirstname()+" "+user.getLastname()+" have created for you, by name<strong>"+pool.getName()+"</strong>." +
	    		"Please use the following steps to subscribe and start predicting:</p>"+
	    		"<p><b>1</b>. Go to the link : http://"+request.getServerName()+"/pool/join</p></br>"+
	    		"<p><b>2</b>. You will have to login using your google/gmail account.</p></br>"+
	    		"<p><b>3</b>. If you are a first time user, you will have to register giving your firstname and lastname.</p></br>"+
	    		"<p><b>4</b>. Enter the referral key : "+pool.getReferralKey()+" .</p></br>"+
			    "<br/><p>Hope you will have great fun.</p>" +
			    "<br/><p>Cheers,<br/>" +
			    "Picket Admin</p>" +
			    "</body></html>";
	}

}
